<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title>商品管理</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
        function page(n, s) {
            if (n) $("#pageNo").val(n);
            if (s) $("#pageSize").val(s);
            $("#searchForm").attr("action", "${ctx}/shop/item/list");
            $("#searchForm").submit();
            return false;
        }
    </script>
</head>
<body>
<ul class="nav nav-tabs">
    <li class="active"><a href="${ctx}/shop/item/list">商品列表</a></li>
    <shiro:hasPermission name="sys:user:edit">
        <li><a href="${ctx}/shop/item/form">商品添加</a></li>
    </shiro:hasPermission>
</ul>
<%--<form:form id="searchForm" modelAttribute="user" action="${ctx}/sys/user/list" method="post"--%>
           <%--class="breadcrumb form-search ">--%>
    <%--<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>--%>
    <%--<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>--%>
    <%--<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();"/>--%>
    <%--<ul class="ul-form">--%>
        <%--<li><label>归属公司：</label>--%>
            <%--<sys:treeselect id="company" name="company.id" value="${user.company.id}" labelName="company.name"--%>
                            <%--labelValue="${user.company.name}"--%>
                            <%--title="公司" url="/sys/office/treeData?type=1" cssClass="input-small" allowClear="true"/></li>--%>
        <%--<li><label>登录名：</label><form:input path="loginName" htmlEscape="false" maxlength="50" class="input-medium"/>--%>
        <%--</li>--%>
        <%--<li class="clearfix"></li>--%>
        <%--<li><label>归属部门：</label><sys:treeselect id="office" name="office.id" value="${user.office.id}"--%>
                                                <%--labelName="office.name" labelValue="${user.office.name}"--%>
                                                <%--title="部门" url="/sys/office/treeData?type=2" cssClass="input-small"--%>
                                                <%--allowClear="true" notAllowSelectParent="true"/></li>--%>
        <%--<li><label>姓&nbsp;&nbsp;&nbsp;名：</label><form:input path="name" htmlEscape="false" maxlength="50"--%>
                                                            <%--class="input-medium"/></li>--%>
        <%--<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"--%>
                                <%--onclick="return page();"/>--%>
            <%--<input id="btnExport" class="btn btn-primary" type="button" value="导出"/>--%>
            <%--<input id="btnImport" class="btn btn-primary" type="button" value="导入"/></li>--%>
        <%--<li class="clearfix"></li>--%>
    <%--</ul>--%>
<%--</form:form>--%>
<sys:message content="${message}"/>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
    <thead>
    <tr>
        <th>商品编码</th>
        <th>商品名称</th>
        <th class="sort-column login_name">市场价</th>
        <th class="sort-column name">价格</th>
        <th>状态</th>
        <th>创建时间</th>
        <shiro:hasPermission name="sys:user:edit">
        <th>操作</th>
        </shiro:hasPermission></tr>
    </thead>
    <tbody>
    <c:forEach items="${page.list}" var="item">
        <tr>
            <td>${item.itemId}</td>
            <td>${item.itemName}</td>
            <td>${item.mPrice}</td>
            <td>${item.price}</td>
            <td>${item.status}</td>
            <td>${item.createTime}</td>
            <shiro:hasPermission name="sys:user:edit">
                <td>
                    <a href="${ctx}/sys/user/form?id=${item.itemId}">修改</a>
                    <a href="${ctx}/sys/user/delete?id=${item.itemId}"
                       onclick="return confirmx('确认要删除该用户吗？', this.href)">删除</a>
                </td>
            </shiro:hasPermission>
        </tr>
    </c:forEach>
    </tbody>
</table>
<div class="pagination">${page}</div>
</body>
</html>